home *** CD-ROM | disk | FTP | other *** search
/ Programming Sound Cards / Programming Sound Cards.iso / sound_52 / wnum.ma < prev    next >
Text File  |  1995-01-01  |  935b  |  48 lines

  1. @include \mh\wind.mh
  2.  
  3. #
  4. # Demo of WNUMERIC 1d array input window
  5. #
  6.  
  7. int outwd
  8. int wd
  9. MAXSIZE = 5
  10. # 1d array we have window on
  11. uchar x[MAXSIZE] = {
  12. C,D,E,F,G
  13. }
  14. uchar xstring[20]
  15. uchar twod[3][10]
  16.  
  17. riff openWindows()
  18. #    void mosWindow(WVCO,0,0)
  19. #    void mosWindow(WRCC,10,0)
  20.     void outputWindow(WDEBUG,20,0,23,25,"printf") # halfway
  21.  
  22.     # NUMERIC window - set values in 1 dim uchar array,
  23.     #    1 to N elements.
  24.     #    upX,upY
  25.     #    lowX,lowY
  26.     #    title string
  27.     #    nolabels = 1    must be 1
  28.     #    fieldsize = 5
  29.     #    nofields = 3
  30.     #    pointer to uchar array of size 1-n
  31.     #        should not wrap off screen!
  32.     #        size of array >= nofields
  33.      wd = inputWindow(WNUMERIC, 11, 20, 13, 60, "x array", 11, 5, 5, &x)
  34.      void windowLabel(wd, "hello there", 0)
  35.     void windowControl(wd, ALLNOTEFIELDS, 0, 0)
  36.  
  37. end
  38.  
  39. vco testit()
  40.     int i
  41.      void openWindows()
  42.     for(;;)
  43.         rest    w
  44.         void printf("%n %n %n %n %n",x[0],x[1],x[2],x[3],x[4])
  45.     end
  46. end
  47.  
  48.